package com.wallet.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wallet.entity.WalletDetailsEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
/**
 * 用户钱包流水Mapper
 * @author zhangguangyuang
 */
@Mapper
public interface WalletDetailsMapper extends BaseMapper<WalletDetailsEntity> {

    /**
     * 根据订单号和交易号获取钱包流水是否存在
     * @param orderNo       订单号
     * @param outTradeNo    交易号
     * @return
     */
    Integer isExistOrderNoAndTradeNo(String orderNo, String outTradeNo);

    /**
     * 获取钱包流水
     * @param walletId    钱包id
     * @param startTime   开始时间
     * @param endTime     结束时间
     * @return
     */
    List<WalletDetailsEntity> getWalletDetailsByWalletIdAndStartTimeAndEndTime(Integer walletId,String startTime,String endTime);

}
